package com.woniuxy.qimengauth.service.impl;

import com.woniuxy.qimengauth.bean.UserBean;
import com.woniuxy.qimengauth.mapper.UserMapper;
import com.woniuxy.qimengauth.service.IUserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Transactional(readOnly = true)
@Service
public class UserServiceImpl implements IUserService {

    @Resource
    private UserMapper userMapper;

    @Transactional(readOnly = false,rollbackFor = Exception.class)

    @Override
    public void saveUserBean(UserBean userBean) {
        userMapper.saveUserBean(userBean);
    }

    @Override
    public UserBean login(String loginName, String password) {
        return userMapper.login(loginName,password);
    }
}
